import React from 'react'
import { PropTypes } from 'prop-types'
import { inject, observer } from 'mobx-react'
import { AppState } from '../../store/appState'

@inject('appState') @observer
class TopicList extends React.Component {
    // constructor() {
    //     super()
    // }

    componentDidMount() {

    }

    asyncBootstrap() {
        return new Promise((resolve => {
            setTimeout(() => {
                const { appState } = this.props
                console.log('appState', appState)
                // if (appState) {
                //     appState.msg = 'xxxccccc'
                // } else {
                //     appState = {}
                //     appState.msg = 'xxxccccc'
                // }
                resolve(true)
            });
        }))
    }

    render() {
        // return <div>xxxxxxxxx111</div>
        // const { appState } = this.props
        return (
            <div>TopicList 1  - </div>
        )
    }
}
export default TopicList

TopicList.propTypes = {
    appState: PropTypes.instanceOf(AppState)
}
